package com.anyou.mall.goo.parameter.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.goo.parameter.mapper.GooGoodsParameterMapper;
import com.anyou.mall.goo.parameter.domain.GooGoodsParameter;
import com.anyou.mall.goo.parameter.service.IGooGoodsParameterService;

/**
 * 商品参数Service业务层处理
 *
 * @author ylj
 * @date 2022-03-29
 */
@Service
public class GooGoodsParameterServiceImpl implements IGooGoodsParameterService
{
    @Autowired
    private GooGoodsParameterMapper gooGoodsParameterMapper;

    /**
     * 查询商品参数
     *
     * @param goodsParameterId 商品参数主键
     * @return 商品参数
     */
    @Override
    public GooGoodsParameter selectGooGoodsParameterByGoodsParameterId(Long goodsParameterId)
    {
        return gooGoodsParameterMapper.selectGooGoodsParameterByGoodsParameterId(goodsParameterId);
    }

    /**
     * 查询商品参数列表
     *
     * @param gooGoodsParameter 商品参数
     * @return 商品参数
     */
    @Override
    public List<GooGoodsParameter> selectGooGoodsParameterList(GooGoodsParameter gooGoodsParameter)
    {
        return gooGoodsParameterMapper.selectGooGoodsParameterList(gooGoodsParameter);
    }

    /**
     * 新增商品参数
     *
     * @param gooGoodsParameter 商品参数
     * @return 结果
     */
    @Override
    public int insertGooGoodsParameter(GooGoodsParameter gooGoodsParameter)
    {
        return gooGoodsParameterMapper.insertGooGoodsParameter(gooGoodsParameter);
    }

    /**
     * 修改商品参数
     *
     * @param gooGoodsParameter 商品参数
     * @return 结果
     */
    @Override
    public int updateGooGoodsParameter(GooGoodsParameter gooGoodsParameter)
    {
        return gooGoodsParameterMapper.updateGooGoodsParameter(gooGoodsParameter);
    }

    /**
     * 批量删除商品参数
     *
     * @param goodsParameterIds 需要删除的商品参数主键
     * @return 结果
     */
    @Override
    public int deleteGooGoodsParameterByGoodsParameterIds(Long[] goodsParameterIds)
    {
        return gooGoodsParameterMapper.deleteGooGoodsParameterByGoodsParameterIds(goodsParameterIds);
    }

    /**
     * 删除商品参数信息
     *
     * @param goodsParameterId 商品参数主键
     * @return 结果
     */
    @Override
    public int deleteGooGoodsParameterByGoodsParameterId(Long goodsParameterId)
    {
        return gooGoodsParameterMapper.deleteGooGoodsParameterByGoodsParameterId(goodsParameterId);
    }
}
